package tommysmapeditor.editors.helpers;

import java.io.File;
import java.io.IOException;

import snippets.ResizeBmp;

public class CreateResized {

	/**returns file name of resized file **/
	public static String resize( String filePath,int width,int height, int zoomFactor ){
		String target = filePath+"x"+zoomFactor+".bmp";
		
		try {
			File ftarget = new File(target);
			ftarget.createNewFile();
			
			ResizeBmp.scale(filePath, width*2, height*2, target);
		} catch (IOException e) {
			e.printStackTrace();
			throw new RuntimeException();
		}
		return target;
	}
	
	
}
